import React, { FC, ReactElement, useEffect } from 'react';
import { View, Text, Image } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import CardWrap from '@/components/CardWrap/CardWrap';
export interface IProps extends ICompProps {
    iconCode?: ReactElement;
    title?: string;
}
Item.defaultProps = {
    iconCode: <>&#xe640;</>,
    title: '标题',
} as Partial<IProps>;
function Item(props: IProps) {
    const { className, style, iconCode, title } = props;
    const localClassName = useClassName('Item', className);
    useEffect(() => {}, []);
    return (
        <RootView className={localClassName} style={style}>
            <CardWrap>
                <View className="item_wrap">
                    <Text className="icon iconfont">{iconCode}</Text>
                    <Text className="title">{title}</Text>
                </View>
            </CardWrap>
        </RootView>
    );
}
export default React.memo(Item as FC<IProps>);
const RootView = styled(View)`
    &.Item {
        margin-bottom: 55px;
        .item_wrap {
            display: flex;
            align-items: center;
            .icon {
                font-size: 40px;
                line-height: 40px;
                margin-right: 24px;
            }
            .title {
                font-size: 28px;
                font-weight: 400;
                color: #333333;
            }
        }
    }
`;
